2025-03-26 00:33:51,210 - INFO - Num classes: 4
2025-03-26 00:35:14,860 - INFO - Class weights: tensor([ 0.3474, 11.3946,  2.2872,  1.6765], device='cuda:0')
2025-03-26 00:35:18,141 - INFO - Model architecture:
CombinedModelCNN(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1024, 8, kernel_size=(5, 5), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(5, 5), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 4, kernel_size=(6, 6), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(4, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(4, 4, kernel_size=(6, 6), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(4, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(4, 4, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1024, out_features=64, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=64, out_features=1024, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1024, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=4, bias=True)
    )
    (logistic): Linear(in_features=4, out_features=4, bias=True)
  )
  (cnn): Sequential(
    (0): Conv2d(8, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (1): ReLU(inplace=True)
    (2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout2d(p=0.2, inplace=False)
    (4): Conv2d(64, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (5): ReLU(inplace=True)
    (6): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout2d(p=0.2, inplace=False)
    (8): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (9): ReLU(inplace=True)
    (10): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (11): Dropout2d(p=0.2, inplace=False)
    (12): Conv2d(16, 4, kernel_size=(1, 1), stride=(1, 1))
  )
)
2025-03-26 00:35:18,141 - INFO - Using cuda device
2025-03-26 00:37:45,556 - INFO - Epoch: 0/100. Training time: 115.134
2025-03-26 00:37:45,557 - INFO - Training Metrics...
2025-03-26 00:37:45,557 - INFO - {'loss': 1.354737259092785, 'f1': 29.75380247602156, 'acc': 36.7984034699151, 'precision': 33.66996674674877, 'recall': 40.167155868792584, 'balanced acc': 40.167155868792584}
2025-03-26 00:37:45,557 - INFO - Validation Metrics... Inference time: 32.279
2025-03-26 00:37:45,557 - INFO - {'loss': 1.2284648418426514, 'f1': 59.59338100254297, 'acc': 80.12632135306555, 'precision': 57.26293756903925, 'recall': 66.20629143494699, 'balanced acc': 66.20629143494699}
2025-03-26 00:37:45,557 - INFO - ==================================================
2025-03-26 00:47:56,672 - INFO - Epoch: 5/100. Training time: 74.806
2025-03-26 00:47:56,683 - INFO - Training Metrics...
2025-03-26 00:47:56,683 - INFO - {'loss': 0.6514496604601542, 'f1': 59.58495009535866, 'acc': 65.7955426356589, 'precision': 59.55311988634728, 'recall': 82.81352103598468, 'balanced acc': 82.81352103598468}
2025-03-26 00:47:56,683 - INFO - Validation Metrics... Inference time: 44.968
2025-03-26 00:47:56,683 - INFO - {'loss': 0.7670996189117432, 'f1': 74.07815593660149, 'acc': 79.64182522903454, 'precision': 68.69582098736731, 'recall': 88.8256734977526, 'balanced acc': 88.8256734977526}
2025-03-26 00:47:56,684 - INFO - ==================================================
2025-03-26 00:57:49,100 - INFO - Epoch: 10/100. Training time: 94.259
2025-03-26 00:57:49,152 - INFO - Training Metrics...
2025-03-26 00:57:49,152 - INFO - {'loss': 0.6228958935964675, 'f1': 62.83523154364757, 'acc': 70.41888150609081, 'precision': 62.26787651708751, 'recall': 82.37571748814686, 'balanced acc': 82.37571748814686}
2025-03-26 00:57:49,152 - INFO - Validation Metrics... Inference time: 18.121
2025-03-26 00:57:49,152 - INFO - {'loss': 0.6811909675598145, 'f1': 75.56266136711434, 'acc': 81.4159619450317, 'precision': 69.76542483570904, 'recall': 89.4602187532169, 'balanced acc': 89.4602187532169}
2025-03-26 00:57:49,153 - INFO - ==================================================
2025-03-26 01:08:23,098 - INFO - Epoch: 15/100. Training time: 75.988
2025-03-26 01:08:23,121 - INFO - Training Metrics...
2025-03-26 01:08:23,121 - INFO - {'loss': 0.5808074247269404, 'f1': 65.48272000854614, 'acc': 75.02219453672943, 'precision': 63.74675304941929, 'recall': 84.38794564049216, 'balanced acc': 84.38794564049216}
2025-03-26 01:08:23,121 - INFO - Validation Metrics... Inference time: 28.187
2025-03-26 01:08:23,121 - INFO - {'loss': 0.6901254653930664, 'f1': 76.66980965670912, 'acc': 82.53224101479915, 'precision': 70.98385662054346, 'recall': 89.88914179501714, 'balanced acc': 89.88914179501714}
2025-03-26 01:08:23,121 - INFO - ==================================================
2025-03-26 01:18:04,105 - INFO - Epoch: 20/100. Training time: 83.079
2025-03-26 01:18:04,133 - INFO - Training Metrics...
2025-03-26 01:18:04,133 - INFO - {'loss': 0.5583620156560626, 'f1': 65.6145412182367, 'acc': 76.68235511258766, 'precision': 63.7692740477241, 'recall': 83.26577614622227, 'balanced acc': 83.26577614622227}
2025-03-26 01:18:04,133 - INFO - Validation Metrics... Inference time: 27.058
2025-03-26 01:18:04,133 - INFO - {'loss': 0.6571066975593567, 'f1': 77.95722800877665, 'acc': 84.00035236081747, 'precision': 72.15234894114758, 'recall': 90.27651231065182, 'balanced acc': 90.27651231065182}
2025-03-26 01:18:04,133 - INFO - ==================================================
2025-03-26 01:27:41,229 - INFO - Epoch: 25/100. Training time: 81.900
2025-03-26 01:27:41,249 - INFO - Training Metrics...
2025-03-26 01:27:41,249 - INFO - {'loss': 0.5176156830219996, 'f1': 67.9938718726377, 'acc': 79.02464008859357, 'precision': 65.22816039514227, 'recall': 85.261955113314, 'balanced acc': 85.261955113314}
2025-03-26 01:27:41,249 - INFO - Validation Metrics... Inference time: 41.856
2025-03-26 01:27:41,249 - INFO - {'loss': 0.6402928233146667, 'f1': 78.8877624018496, 'acc': 84.86486962649752, 'precision': 73.06375091640234, 'recall': 90.64790720749811, 'balanced acc': 90.64790720749811}
2025-03-26 01:27:41,249 - INFO - ==================================================
2025-03-26 01:37:22,498 - INFO - Epoch: 30/100. Training time: 102.540
2025-03-26 01:37:22,581 - INFO - Training Metrics...
2025-03-26 01:37:22,581 - INFO - {'loss': 0.5042244309470767, 'f1': 67.2807418568072, 'acc': 76.99497046880767, 'precision': 65.43390383305999, 'recall': 85.22701132161023, 'balanced acc': 85.22701132161023}
2025-03-26 01:37:22,582 - INFO - Validation Metrics... Inference time: 31.919
2025-03-26 01:37:22,582 - INFO - {'loss': 0.6500691771507263, 'f1': 78.80740091390908, 'acc': 84.55373502466526, 'precision': 73.1014068459621, 'recall': 90.97277814325719, 'balanced acc': 90.97277814325719}
2025-03-26 01:37:22,582 - INFO - ==================================================
2025-03-26 01:46:16,021 - INFO - Epoch: 35/100. Training time: 60.093
2025-03-26 01:46:16,053 - INFO - Training Metrics...
2025-03-26 01:46:16,053 - INFO - {'loss': 0.48072523304394316, 'f1': 66.28956898108244, 'acc': 79.26818014027316, 'precision': 63.73172055059785, 'recall': 82.98696609057117, 'balanced acc': 82.98696609057117}
2025-03-26 01:46:16,053 - INFO - Validation Metrics... Inference time: 30.820
2025-03-26 01:46:16,053 - INFO - {'loss': 0.6131765842437744, 'f1': 79.58481779042518, 'acc': 85.51691331923888, 'precision': 73.8246119173167, 'recall': 90.94569619099704, 'balanced acc': 90.94569619099704}
2025-03-26 01:46:16,053 - INFO - ==================================================
2025-03-26 01:55:33,005 - INFO - Epoch: 40/100. Training time: 77.556
2025-03-26 01:55:33,065 - INFO - Training Metrics...
2025-03-26 01:55:33,066 - INFO - {'loss': 0.502579274631682, 'f1': 68.33037074775653, 'acc': 78.8985326688815, 'precision': 66.23450366230202, 'recall': 85.81618102753664, 'balanced acc': 85.81618102753664}
2025-03-26 01:55:33,066 - INFO - Validation Metrics... Inference time: 41.913
2025-03-26 01:55:33,066 - INFO - {'loss': 0.5941970944404602, 'f1': 80.16404865613285, 'acc': 86.10535588442563, 'precision': 74.49641610246117, 'recall': 91.10695417983185, 'balanced acc': 91.10695417983185}
2025-03-26 01:55:33,066 - INFO - ==================================================
2025-03-26 02:05:30,091 - INFO - Epoch: 45/100. Training time: 99.455
2025-03-26 02:05:30,153 - INFO - Training Metrics...
2025-03-26 02:05:30,153 - INFO - {'loss': 0.4650655048234122, 'f1': 69.23850580205678, 'acc': 80.12592284976007, 'precision': 66.53664652462199, 'recall': 86.9216363932743, 'balanced acc': 86.9216363932743}
2025-03-26 02:05:30,153 - INFO - Validation Metrics... Inference time: 13.816
2025-03-26 02:05:30,154 - INFO - {'loss': 0.5958929657936096, 'f1': 79.7670149025281, 'acc': 85.57364341085272, 'precision': 74.2388162960178, 'recall': 91.17816151117852, 'balanced acc': 91.17816151117852}
2025-03-26 02:05:30,154 - INFO - ==================================================
2025-03-26 02:15:12,351 - INFO - Epoch: 50/100. Training time: 70.430
2025-03-26 02:15:12,421 - INFO - Training Metrics...
2025-03-26 02:15:12,422 - INFO - {'loss': 0.5037510196367899, 'f1': 68.71347020352026, 'acc': 79.7218530823182, 'precision': 66.47293544554104, 'recall': 86.38029957133439, 'balanced acc': 86.38029957133439}
2025-03-26 02:15:12,422 - INFO - Validation Metrics... Inference time: 39.889
2025-03-26 02:15:12,422 - INFO - {'loss': 0.5811841487884521, 'f1': 80.68630307594623, 'acc': 86.27272727272728, 'precision': 74.97425939671804, 'recall': 91.90171112717685, 'balanced acc': 91.90171112717685}
2025-03-26 02:15:12,422 - INFO - ==================================================
2025-03-26 02:24:50,674 - INFO - Epoch: 55/100. Training time: 100.472
2025-03-26 02:24:50,720 - INFO - Training Metrics...
2025-03-26 02:24:50,748 - INFO - {'loss': 0.5004697782652718, 'f1': 68.0119661489835, 'acc': 81.10086747877445, 'precision': 65.1694547186969, 'recall': 84.38345031592792, 'balanced acc': 84.38345031592792}
2025-03-26 02:24:50,749 - INFO - Validation Metrics... Inference time: 10.053
2025-03-26 02:24:50,749 - INFO - {'loss': 0.5872215032577515, 'f1': 80.55101119258819, 'acc': 86.00458069062721, 'precision': 74.85028153082438, 'recall': 92.07653923378734, 'balanced acc': 92.07653923378734}
2025-03-26 02:24:50,749 - INFO - ==================================================
2025-03-26 02:34:30,341 - INFO - Epoch: 60/100. Training time: 75.462
2025-03-26 02:34:30,434 - INFO - Training Metrics...
2025-03-26 02:34:30,434 - INFO - {'loss': 0.4651766362644377, 'f1': 69.5300404941309, 'acc': 82.3390088593577, 'precision': 67.12171294332539, 'recall': 83.7849160631013, 'balanced acc': 83.7849160631013}
2025-03-26 02:34:30,434 - INFO - Validation Metrics... Inference time: 44.480
2025-03-26 02:34:30,434 - INFO - {'loss': 0.5883829593658447, 'f1': 80.42586223418265, 'acc': 85.86293164200141, 'precision': 74.79017929597856, 'recall': 92.07440994916202, 'balanced acc': 92.07440994916202}
2025-03-26 02:34:30,435 - INFO - ==================================================
2025-03-26 02:44:35,918 - INFO - Epoch: 65/100. Training time: 95.407
2025-03-26 02:44:35,952 - INFO - Training Metrics...
2025-03-26 02:44:35,952 - INFO - {'loss': 0.44545223599388484, 'f1': 69.74439025787686, 'acc': 81.59131598375782, 'precision': 67.07518028965738, 'recall': 87.25882953916346, 'balanced acc': 87.25882953916346}
2025-03-26 02:44:35,952 - INFO - Validation Metrics... Inference time: 24.361
2025-03-26 02:44:35,952 - INFO - {'loss': 0.5654688477516174, 'f1': 80.86193296603273, 'acc': 86.33104298801973, 'precision': 75.24721078990896, 'recall': 92.12580601197789, 'balanced acc': 92.12580601197789}
2025-03-26 02:44:35,952 - INFO - ==================================================
2025-03-26 02:54:33,775 - INFO - Epoch: 70/100. Training time: 81.511
2025-03-26 02:54:33,807 - INFO - Training Metrics...
2025-03-26 02:54:33,807 - INFO - {'loss': 0.4740904938606989, 'f1': 69.18976219092866, 'acc': 80.14031930601698, 'precision': 67.03309305349964, 'recall': 86.00884813232221, 'balanced acc': 86.00884813232221}
2025-03-26 02:54:33,808 - INFO - Validation Metrics... Inference time: 31.017
2025-03-26 02:54:33,808 - INFO - {'loss': 0.5507262349128723, 'f1': 81.05987899282805, 'acc': 86.56007751937985, 'precision': 75.51433598092949, 'recall': 92.04664227878158, 'balanced acc': 92.04664227878158}
2025-03-26 02:54:33,808 - INFO - ==================================================
2025-03-26 03:03:33,990 - INFO - Epoch: 75/100. Training time: 72.115
2025-03-26 03:03:34,042 - INFO - Training Metrics...
2025-03-26 03:03:34,042 - INFO - {'loss': 0.48973093430201214, 'f1': 67.25333181694685, 'acc': 78.66085271317831, 'precision': 65.21737460907, 'recall': 84.86368684262696, 'balanced acc': 84.86368684262696}
2025-03-26 03:03:34,043 - INFO - Validation Metrics... Inference time: 31.553
2025-03-26 03:03:34,043 - INFO - {'loss': 0.5467549562454224, 'f1': 81.15773845581717, 'acc': 86.61134601832276, 'precision': 75.48929822422153, 'recall': 92.11658390886775, 'balanced acc': 92.11658390886775}
2025-03-26 03:03:34,043 - INFO - ==================================================
2025-03-26 03:13:07,598 - INFO - Epoch: 80/100. Training time: 88.292
2025-03-26 03:13:07,605 - INFO - Training Metrics...
2025-03-26 03:13:07,605 - INFO - {'loss': 0.47385768805231365, 'f1': 68.6409498274841, 'acc': 80.6799095607235, 'precision': 66.0210028363044, 'recall': 86.37505899149942, 'balanced acc': 86.37505899149942}
2025-03-26 03:13:07,605 - INFO - Validation Metrics... Inference time: 25.882
2025-03-26 03:13:07,605 - INFO - {'loss': 0.5453741550445557, 'f1': 81.32842942492165, 'acc': 86.76039464411556, 'precision': 75.69734177924944, 'recall': 92.21189740164024, 'balanced acc': 92.21189740164024}
2025-03-26 03:13:07,605 - INFO - ==================================================
2025-03-26 03:22:51,931 - INFO - Epoch: 85/100. Training time: 114.395
2025-03-26 03:22:51,961 - INFO - Training Metrics...
2025-03-26 03:22:51,961 - INFO - {'loss': 0.47518077066966463, 'f1': 70.22417218531987, 'acc': 81.82152085640459, 'precision': 67.63037612515174, 'recall': 86.79290902754227, 'balanced acc': 86.79290902754227}
2025-03-26 03:22:51,962 - INFO - Validation Metrics... Inference time: 16.716
2025-03-26 03:22:51,962 - INFO - {'loss': 0.555555522441864, 'f1': 81.2238705921086, 'acc': 86.62244538407329, 'precision': 75.6223705866137, 'recall': 92.22135324289626, 'balanced acc': 92.22135324289626}
2025-03-26 03:22:51,962 - INFO - ==================================================
2025-03-26 03:32:07,231 - INFO - Epoch: 90/100. Training time: 76.848
2025-03-26 03:32:07,306 - INFO - Training Metrics...
2025-03-26 03:32:07,306 - INFO - {'loss': 0.45366857733045307, 'f1': 69.51391319090757, 'acc': 82.65194721299372, 'precision': 66.97058621618618, 'recall': 86.20903815275233, 'balanced acc': 86.20903815275233}
2025-03-26 03:32:07,306 - INFO - Validation Metrics... Inference time: 29.639
2025-03-26 03:32:07,307 - INFO - {'loss': 0.5794698596000671, 'f1': 80.67881652203197, 'acc': 86.08139534883722, 'precision': 75.09373767136279, 'recall': 92.14612715039576, 'balanced acc': 92.14612715039576}
2025-03-26 03:32:07,307 - INFO - ==================================================
2025-03-26 03:41:47,686 - INFO - Epoch: 95/100. Training time: 99.066
2025-03-26 03:41:47,724 - INFO - Training Metrics...
2025-03-26 03:41:47,724 - INFO - {'loss': 0.46147362391153973, 'f1': 68.84560610066363, 'acc': 79.40766888150608, 'precision': 66.970186680067, 'recall': 85.88689502763833, 'balanced acc': 85.88689502763833}
2025-03-26 03:41:47,724 - INFO - Validation Metrics... Inference time: 28.251
2025-03-26 03:41:47,724 - INFO - {'loss': 0.571686327457428, 'f1': 80.85032637151144, 'acc': 86.2285059901339, 'precision': 75.30711217238122, 'recall': 92.20183077049771, 'balanced acc': 92.20183077049771}
2025-03-26 03:41:47,724 - INFO - ==================================================
2025-03-26 03:48:58,094 - INFO - Initializing final Evaluations:

2025-03-26 03:49:06,775 - INFO - Final validation metrics:
{'f1': 81.40126633126621, 'acc': 86.87579281183932, 'precision': 75.79258396101127, 'recall': 92.17471578860581, 'balanced acc': 92.17471578860581}
2025-03-26 03:49:15,488 - INFO - Final test pixel-wise classification metrics:
{'f1': 20.663422207934108, 'acc': 70.43569415081043, 'precision': 17.60892353770261, 'recall': 25.0, 'balanced acc': 25.0}
